package cn.wolfcode.wms.domain;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

//采购单对象
@Getter@Setter@ToString
public class StockIncomeBill extends BaseDomain{
    //单据的状态吗是固定的值,做成常量
    public static final Integer NO_AUDITED = 1;
    public static final Integer AUDITED = 2;

    private String sn;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date vdate; //业务时间
    private Integer status = NO_AUDITED; //审核状态
    private BigDecimal totalAmount; //采购总金额
    private BigDecimal totalNumber; //采购总数量
    private Date auditTime; //审核时间
    private Date inputTime; //录入时间

    //关联对象
    private Employee inputUser;  //录入人
    private Employee auditor;  //审核人
    private Depot depot; //仓库

    //包含的明细
    private List<StockIncomeBillItem> items = new ArrayList();

}